Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OpenSC compatibility for RSA #96

Merged
merged 1 commit into from
Jan 31, 2023
Merged

Fix OpenSC compatibility for RSA #96

merged 1 commit into from
Jan 31, 2023

Conversation

sosthene-nitrokey
Copy link
Collaborator

The opensc inability to generate RSA keys was due to OpenSC trying to set the algorithm attributes to a fixed byte string that was not exactly the one we accepted (because it specifies the Import even for key generation).

@sosthene-nitrokey
Copy link
Collaborator Author

Also, OpenSC only allows generating a key if the attributes have already been set to the correct key because it doesn't use the algorithm information DO to fetch the list of supported algorithms.

@sosthene-nitrokey
Copy link
Collaborator Author

It's still not possible to generate Curve25519 keys however.

@sosthene-nitrokey
Copy link
Collaborator Author

There are still some errors with the latest OpenSC versions thought

@sosthene-nitrokey
Copy link
Collaborator Author

sosthene-nitrokey commented Nov 28, 2022

There are still some errors with the latest OpenSC versions thought

Actually, this was due to how I compiled OpenSC and works correctly. With version 0.23-rc2 it actually doesn't have the issue with the attributes. It still doesn't work for curve25519

@sosthene-nitrokey
Copy link
Collaborator Author

For curve25519 it seems OpenSC parses the curve attributes as for XEdDSA, not X25519 and Ed25519 separately.

Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants